package com.terrynoya.fight.timer
{
	import flash.events.Event;
	import flash.events.TimerEvent;
	
	public class MTimerEvent extends Event
	{
		public static const TIME_SNAP_UPDATE:String = "time_snap_update";
		
		private var _timerEvt:TimerEvent;
		
		private var _snap:Number = 0;
		
		private var _time:Number = 0;
		
		public function MTimerEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false)
		{
			super(type, bubbles, cancelable);
		}
		
		public function get time():Number
		{
			return _time;
		}

		public function set time(value:Number):void
		{
			_time = value;
		}

		public function get timerEvt():TimerEvent
		{
			return _timerEvt;
		}

		public function set timerEvt(value:TimerEvent):void
		{
			_timerEvt = value;
		}

		public function get snap():Number
		{
			return _snap;
		}

		public function set snap(value:Number):void
		{
			_snap = value;
		}

		override public function clone():Event
		{
			var evt:MTimerEvent = new MTimerEvent(this.type,this.bubbles,this.cancelable);
			evt.snap = this.snap;
			evt.time = this.time;
			return evt;
		}
		
		public function updateAfterEvent():void
		{
			this._timerEvt.updateAfterEvent();
		}
	}
}